/*
 *--------------------------------------------------------------------------
 *   File Name:	syscall.c
 * 
 * Description:	none
 * 
 * 
 *      Author:	Zhao Yanbai [zhaoyanbai@126.com]
 * 
 *     Version:	1.0
 * Create Date: Fri Jan  2 19:49:20 2009
 * Last Update: Fri Jan  2 19:49:20 2009
 * 
 *--------------------------------------------------------------------------
 */
#include "syscall.h"
#include "system.h"
#include "sched.h"
#include "msr.h"

extern void syscall_entry();

void	SetupSysc()
{
	wrmsr(MSR_SYSENTER_CS,	SELECTOR_KRNL_CS,	0);
	wrmsr(MSR_SYSENTER_EIP,	syscall_entry,		0);
	wrmsr(MSR_SYSENTER_ESP,	&current,		0);
}
